import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import ProjectProportionPieChart from "./index";

const meta = {
  title: "饼图/项目总数占比-ProjectProportionPieChart",
  component: ProjectProportionPieChart,
  tags: ["autodocs"],
  argTypes: {},
  decorators: [
    (Story) => (
      <div style={{ backgroundColor: "#031857" }}>
        <Story />
      </div>
    ),
  ],
} satisfies Meta<typeof ProjectProportionPieChart>;

export default meta;
type Story = StoryObj<typeof meta>;

export const basic: Story = {
  args: {
    dataSource: [
      {
        name: "房屋建筑",
        amount: 40,
      },
      {
        name: "交通",
        amount: 14,
      },
      {
        name: "市政",
        amount: 26,
      },
      {
        name: "水利",
        amount: 20,
      },
    ],
  },
};
